/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.ipo.mm.web.formbeans;

import java.io.UnsupportedEncodingException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionMapping;
import org.ipo.mm.web.util.ConstantManager;

/**
 *
 * @author makcro
 */
public class MeetingSearchBean extends org.apache.struts.validator.ValidatorForm {
    //general
    private String venueFilter;
    private String venueOperator;
    private String meetingNameFilter;
    private String meetingNameOperator;
    private String conclusionsFilter;
    private String conclusionsOperator;
    private String dateIntervalStart;
    private String dateIntervalEnd;

    //organizer specific
    private String orgNameFilter;
    private String[] orgInstitutionFilter;
    private String[] orgITypeFilter;
    private String[] orgIRegionFilter;
    private String[] orgIFamilyFilter;
    private String[] orgICityFilter;
    private String orgNameOperator;


    //representative specific
    private String repNameFilter;
    private String[] repInstitutionFilter;
    private String[] repITypeFilter;
    private String[] repIRegionFilter;
    private String[] repIFamilyFilter;
    private String[] repICityFilter;

    private String repNameOperator;

    private String orderByClause;


    @Override
    public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
        ActionErrors errors = super.validate(mapping, request);
        
        return errors;
    }

    public String getConclusionsFilter() {
        return conclusionsFilter;
    }

    public String[] getOrgICityFilter() {
        return orgICityFilter;
    }

    public void setOrgICityFilter(String[] orgICityFilter) {
        this.orgICityFilter = orgICityFilter;
    }

    
    public void setConclusionsFilter(String conclusionsFilter) {
        try {
            this.conclusionsFilter = new String(conclusionsFilter.getBytes(ConstantManager.ENCODING_ISO88592), ConstantManager.ENCODING_UTF8);
        } catch (UnsupportedEncodingException ex) {
            Logger.getLogger(MeetingSearchBean.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

    public String getDateIntervalEnd() {
        return dateIntervalEnd;
    }

    public String[] getRepICityFilter() {
        return repICityFilter;
    }

    public void setRepICityFilter(String[] repICityFilter) {
        this.repICityFilter = repICityFilter;
    }


    public void setDateIntervalEnd(String dateIntervalEnd) {
        this.dateIntervalEnd = dateIntervalEnd;
    }

    public String getDateIntervalStart() {
        return dateIntervalStart;
    }

    public void setDateIntervalStart(String dateIntervalStart) {
        this.dateIntervalStart = dateIntervalStart;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    

    public String getMeetingNameFilter() {
        return meetingNameFilter;
    }

    public void setMeetingNameFilter(String meetingNameFilter) {
        try {
            this.meetingNameFilter = new String(meetingNameFilter.getBytes(ConstantManager.ENCODING_ISO88592), ConstantManager.ENCODING_UTF8);
        } catch (UnsupportedEncodingException ex) {
            Logger.getLogger(MeetingSearchBean.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

    public String[] getOrgIFamilyFilter() {
        return orgIFamilyFilter;
    }

    public void setOrgIFamilyFilter(String[] orgIFamilyFilter) {
        this.orgIFamilyFilter = orgIFamilyFilter;
    }

    

    public String[] getOrgITypeFilter() {
        return orgITypeFilter;
    }

    public void setOrgITypeFilter(String[] orgITypeFilter) {
        this.orgITypeFilter = orgITypeFilter;
    }

    public String[] getOrgInstitutionFilter() {
        return orgInstitutionFilter;
    }

    public void setOrgInstitutionFilter(String[] orgInstitutionFilter) {
        this.orgInstitutionFilter = orgInstitutionFilter;
    }

    public String getOrgNameFilter() {
        return orgNameFilter;
    }

    public void setOrgNameFilter(String orgNameFilter) {
        try {
            this.orgNameFilter = new String(orgNameFilter.getBytes(ConstantManager.ENCODING_ISO88592), ConstantManager.ENCODING_UTF8);
        } catch (UnsupportedEncodingException ex) {
            Logger.getLogger(MeetingSearchBean.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

    public String[] getRepIFamilyFilter() {
        return repIFamilyFilter;
    }

    public void setRepIFamilyFilter(String[] repIFamilyFilter) {
        this.repIFamilyFilter = repIFamilyFilter;
    }

    public String[] getOrgIRegionFilter() {
        return orgIRegionFilter;
    }

    public void setOrgIRegionFilter(String[] orgIRegionFilter) {
        this.orgIRegionFilter = orgIRegionFilter;
    }

    public String[] getRepIRegionFilter() {
        return repIRegionFilter;
    }

    public void setRepIRegionFilter(String[] repIRegionFilter) {
        this.repIRegionFilter = repIRegionFilter;
    }

   

    public String[] getRepITypeFilter() {
        return repITypeFilter;
    }

    public void setRepITypeFilter(String[] repITypeFilter) {
        this.repITypeFilter = repITypeFilter;
    }

    public String[] getRepInstitutionFilter() {
        return repInstitutionFilter;
    }

    public void setRepInstitutionFilter(String[] repInstitutionFilter) {
        this.repInstitutionFilter = repInstitutionFilter;
    }

    public String getRepNameFilter() {
        return repNameFilter;
    }

    public void setRepNameFilter(String repNameFilter) {
        try {
            this.repNameFilter = new String(repNameFilter.getBytes(ConstantManager.ENCODING_ISO88592), ConstantManager.ENCODING_UTF8);
        } catch (UnsupportedEncodingException ex) {
            Logger.getLogger(MeetingSearchBean.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

    public String getVenueFilter() {
        return venueFilter;
    }

    public void setVenueFilter(String venueFilter) {
        try {
            this.venueFilter = new String(venueFilter.getBytes(ConstantManager.ENCODING_ISO88592), ConstantManager.ENCODING_UTF8);
        } catch (UnsupportedEncodingException ex) {
            Logger.getLogger(MeetingSearchBean.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

    public String getConclusionsOperator() {
        return conclusionsOperator;
    }

    public void setConclusionsOperator(String conclusionsOperator) {
        this.conclusionsOperator = conclusionsOperator;
    }

    public String getMeetingNameOperator() {
        return meetingNameOperator;
    }

    public void setMeetingNameOperator(String meetingNameOperator) {
        this.meetingNameOperator = meetingNameOperator;
    }

    public String getOrgNameOperator() {
        return orgNameOperator;
    }

    public void setOrgNameOperator(String orgNameOperator) {
        this.orgNameOperator = orgNameOperator;
    }

    public String getRepNameOperator() {
        return repNameOperator;
    }

    public void setRepNameOperator(String repNameOperator) {
        this.repNameOperator = repNameOperator;
    }

    public String getVenueOperator() {
        return venueOperator;
    }

    public void setVenueOperator(String venueOperator) {
        this.venueOperator = venueOperator;
    }


}
